home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / packer / tar / doc / tar.man < prev    next >
Text File  |  1995-03-09  |  16KB  |  331 lines

  1.  
  2.  
  3.  
  4.      TTTTAAAARRRR((((1111))))             AAAAmmmmiiiiggggaaaaDDDDOOOOSSSS ((((5555 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999988887777))))              TTTTAAAARRRR((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           tar - tape (or other media) file archiver
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           ttttaaaarrrr -[BBBBccccddddDDDDhhhhiiiikkkkllllmmmmooooppppRRRRssssttttvvvvxxxxzzzzZZZZ] [----bbbb _N] [----ffff _F] [----TTTT _F] [ _f_i_l_e_n_a_m_e _o_r
  13.           _r_e_g_e_x_p ...  ]
  14.  
  15.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.           _t_a_r provides a way to store many files into a single
  17.           archive, which can be kept in another Unix file, stored on
  18.           an I/O device such as tape, floppy, cartridge, or disk, sent
  19.           over a network, or piped to another program.  It is useful
  20.           for making backup copies, or for packaging up a set of files
  21.           to move them to another system.
  22.  
  23.           _t_a_r has existed since Version 7 Unix with very little
  24.           change.  It has been proposed as the standard format for
  25.           interchange of files among systems that conform to the IEEE
  26.           P1003 ``Portable Operating System'' standard.
  27.  
  28.           This version of _t_a_r supports some of the extensions which
  29.           were proposed in the P1003 draft standards, including owner
  30.           and group names, and support for named pipes, fifos,
  31.           contiguous files, and block and character devices.
  32.  
  33.           When reading an archive, this version of _t_a_r continues after
  34.           finding an error.  Previous versions required the `i' option
  35.           to ignore checksum errors.
  36.  
  37.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  38.           _t_a_r options can be specified in either of two ways.  The
  39.           usual Unix conventions can be used: each option is preceded
  40.           by `-'; arguments directly follow each option; multiple
  41.           options can be combined behind one `-' as long as they take
  42.           no arguments.  For compatability with the Unix _t_a_r program,
  43.           the options may also be specified as ``keyletters,'' wherein
  44.           all the option letters occur in the first argument to _t_a_r,
  45.           with no `-', and their arguments, if any, occur in the
  46.           second, third, ...  arguments.  Examples:
  47.  
  48.           Normal:  tar -f arcname -cv file1 file2
  49.  
  50.           Old:  tar fcv arcname file1 file2
  51.  
  52.           At least one of the ----cccc, ----tttt, ----dddd, or ----xxxx options must be
  53.           included.  The rest are optional.
  54.  
  55.           Files to be operated upon are specified by a list of file
  56.           names, which follows the option specifications (or can be
  57.           read from a file by the ----TTTT option).  Specifying a directory
  58.           name causes that directory and all the files it contains to
  59.           be (recursively) processed.  If a full path name is
  60.  
  61.  
  62.  
  63.      Page 1                                           (printed 3/8/90)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      TTTTAAAARRRR((((1111))))             AAAAmmmmiiiiggggaaaaDDDDOOOOSSSS ((((5555 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999988887777))))              TTTTAAAARRRR((((1111))))
  71.  
  72.  
  73.  
  74.           specified when creating an archive, it will be written to
  75.           the archive without the initial "/", to allow the files to
  76.           be later read into a different place than where they were
  77.           dumped from, and a warning will be printed.  If files are
  78.           extracted from an archive which contains full path names,
  79.           they will be extracted relative to the current directory and
  80.           a warning message printed.
  81.  
  82.           When extracting or listing files, the ``file names'' are
  83.           treated as regular expressions, using mostly the same syntax
  84.           as the shell.  The shell actually matches each substring
  85.           between ``/''s separately, while _t_a_r matches the entire
  86.           string at once, so some anomalies will occur; e.g. ``*'' or
  87.           ``?'' can match a ``/''.  To specify a regular expression as
  88.           an argument to _t_a_r, quote it so the shell will not expand
  89.           it.
  90.  
  91.           ----aaaa   Set the archived bit of the file as it is added to the
  92.                archive. (Amiga only)
  93.  
  94.           ----AAAA   Do not add the file to the archive if its archived bit
  95.                is set.  Applies only to regular files, directories are
  96.                always dumped (Amiga only)
  97.  
  98.           ----bbbb _N Specify a blocking factor for the archive.  The block
  99.                size will be _N x 512 bytes.  Larger blocks typically
  100.                run faster and let you fit more data on a tape.  The
  101.                default blocking factor is set when _t_a_r is compiled,
  102.                and is typically 20.  There is no limit to the maximum
  103.                block size, as long as enough memory can be allocated
  104.                for it, and as long as the device containing the
  105.                archive can read or write that block size.
  106.  
  107.           ----BBBB   When reading an archive, reblock it as we read it.
  108.                Normally, _t_a_r reads each block with a single _r_e_a_d(_2)
  109.                system call.  This does not work when reading from a
  110.                pipe or network socket under Berkeley Unix; _r_e_a_d(_2)
  111.                only gives as much data as has arrived at the moment.
  112.                With this option, it will do multiple _r_e_a_d(_2)s to fill
  113.                out to a record boundary, rather than reporting an
  114.                error.  This option is default when reading an archive
  115.                from standard input, or over a network.
  116.  
  117.           ----cccc   Create an archive from a list of files.
  118.  
  119.           ----dddd   Diff an archive against the files in the file system.
  120.                Reports differences in file size, mode, uid, gid, and
  121.                contents.  If a file exists on the tape, but not in the
  122.                file system, that is reported.  This option needs
  123.                further work to be really useful.
  124.  
  125.           ----DDDD   When creating an archive, only dump each directory
  126.  
  127.  
  128.  
  129.      Page 2                                           (printed 3/8/90)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      TTTTAAAARRRR((((1111))))             AAAAmmmmiiiiggggaaaaDDDDOOOOSSSS ((((5555 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999988887777))))              TTTTAAAARRRR((((1111))))
  137.  
  138.  
  139.  
  140.                itself; don't dump all the files inside the directory.
  141.                In conjunction with _f_i_n_d(1), this is useful in creating
  142.                incremental dumps for archival backups, similar to
  143.                those produced by _d_u_m_p(8).
  144.  
  145.           ----ffff _F Specify the filename of the archive.  If the specified
  146.                filename is ``-'', the archive is read from the
  147.                standard input or written to the standard output.  If
  148.                the ----ffff option is not used, and the environment variable
  149.                TTTTAAAAPPPPEEEE exists, its value will be used; otherwise, a
  150.                default archive name (which was picked when tar was
  151.                compiled) is used.  The default is normally set to the
  152.                ``first'' tape drive or other transportable I/O medium
  153.                on the system.
  154.  
  155.                If the filename contains a colon before a slash, it is
  156.                interpreted as a ``hostname:/file/name'' pair.  _t_a_r
  157.                will invoke the commands _r_s_h and _d_d to access the
  158.                specified file or device on the system _h_o_s_t_n_a_m_e.  If
  159.                you need to do something unusual like rsh with a
  160.                different user name, use ``----ffff ----'' and pipe it to rsh
  161.                manually.
  162.  
  163.           ----hhhh   When creating an archive, if a symbolic link is
  164.                encountered, dump the file or directory to which it
  165.                points, rather than dumping it as a symbolic link.
  166.                (Does not apply to Amiga)
  167.  
  168.           ----iiii   When reading an archive, ignore blocks of zeros in the
  169.                archive.  Normally a block of zeros indicates the end
  170.                of the archive, but in a damaged archive, or one which
  171.                was created by appending several archives, this option
  172.                allows _t_a_r to continue.  It is not on by default
  173.                because there is garbage written after the zeroed
  174.                blocks by the Unix _t_a_r program.  Note that with this
  175.                option set, _t_a_r will read all the way to the end of the
  176.                file, eliminating problems with multi-file tapes.
  177.  
  178.           ----kkkk   When extracting files from an archive, keep existing
  179.                files, rather than overwriting them with the version
  180.                from the archive.
  181.  
  182.           ----llll   When dumping the contents of a directory to an archive,
  183.                stay within the local file system of that directory.
  184.                This option only affects the files dumped because they
  185.                are in a dumped directory; files named on the command
  186.                line are always dumped, and they can be from various
  187.                file systems.  This is useful for making ``full dump''
  188.                archival backups of a file system, as with the _d_u_m_p(8)
  189.                command.  Files which are skipped due to this option
  190.                are mentioned on the standard error.
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                           (printed 3/8/90)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      TTTTAAAARRRR((((1111))))             AAAAmmmmiiiiggggaaaaDDDDOOOOSSSS ((((5555 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999988887777))))              TTTTAAAARRRR((((1111))))
  203.  
  204.  
  205.  
  206.           ----mmmm   When extracting files from an archive, set each file's
  207.                modified timestamp to the current time, rather than
  208.                extracting each file's modified timestamp from the
  209.                archive.
  210.  
  211.           ----oooo   When creating an archive, write an old format archive,
  212.                which does not include information about directories,
  213.                pipes, fifos, contiguous files, or device files, and
  214.                specifies file ownership by uid's and gid's rather than
  215.                by user names and group names.  In most cases, a
  216.                ``new'' format archive can be read by an ``old'' tar
  217.                program without serious trouble, so this option should
  218.                seldom be needed.
  219.  
  220.           ----pppp   When extracting files from an archive, restore them to
  221.                the same permissions that they had in the archive.  If
  222.                ----pppp is not specified, the current umask limits the
  223.                permissions of the extracted files.  See _u_m_a_s_k(_2).
  224.                (Does not apply to Amiga version, permission always
  225.                completely restored)
  226.  
  227.           ----RRRR   With each message that _t_a_r produces, print the record
  228.                number within the archive where the message occurred.
  229.                This option is especially useful when reading damaged
  230.                archives, since it helps to pinpoint the damaged
  231.                section.
  232.  
  233.           ----ssss   When specifying a list of filenames to be listed or
  234.                extracted from an archive, the ----ssss flag specifies that
  235.                the list is sorted into the same order as the tape.
  236.                This allows a large list to be used, even on small
  237.                machines, because the entire list need not be read into
  238.                memory at once.  Such a sorted list can easily be
  239.                created by running ``tar -t'' on the archive and
  240.                editing its output.
  241.  
  242.           ----tttt   List a table of contents of an existing archive.  If
  243.                file names are specified, just list files matching the
  244.                specified names.  The listing appears on the standard
  245.                output.
  246.  
  247.           ----TTTT _F Rather than specifying file names or regular
  248.                expressions as arguments to the _t_a_r command, this
  249.                option specifies that they should be read from the file
  250.                _F, one per line.  If the file name specified is ``-'',
  251.                the list is read from the standard input.  This option,
  252.                in conjunction with the ----ssss option, allows an
  253.                arbitrarily large list of files to be processed, and
  254.                allows the list to be piped to _t_a_r.
  255.  
  256.           ----vvvv   Be verbose about the files that are being processed or
  257.                listed.  Normally, archive creation, file extraction,
  258.  
  259.  
  260.  
  261.      Page 4                                           (printed 3/8/90)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      TTTTAAAARRRR((((1111))))             AAAAmmmmiiiiggggaaaaDDDDOOOOSSSS ((((5555 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999988887777))))              TTTTAAAARRRR((((1111))))
  269.  
  270.  
  271.  
  272.                and differencing are silent, and archive listing just
  273.                gives file names.  The ----vvvv option causes an ``ls
  274.                -l''-like listing to be produced.  The output from -v
  275.                appears on the standard output except when creating an
  276.                archive (since the new archive might be on standard
  277.                output), where it goes to the standard error output.
  278.  
  279.           ----xxxx   Extract files from an existing archive.  If file names
  280.                are specified, just extract files matching the
  281.                specified names, otherwise extract all the files in the
  282.                archive.
  283.  
  284.           ----zzzz or ----ZZZZ
  285.                The archive should be compressed as it is written, or
  286.                decompressed as it is read, using the _c_o_m_p_r_e_s_s(_1)
  287.                program.  This option works on I/O devices and over the
  288.                network, as well as on disk files; data to or from such
  289.                devices is reblocked using a ``dd'' command to enforce
  290.                the specified (or default) block size.  The default
  291.                compression parameters are used; if you need to
  292.                override them, avoid the ``z'' option and compress it
  293.                yourself.  (Not currently supported on Amiga)
  294.  
  295.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  296.           shar(1), tar(5), compress(1), ar(1), arc(1), cpio(1),
  297.           dump(8), restore(8), restor(8), rsh(1), dd(1), find(1)
  298.  
  299.      BBBBUUUUGGGGSSSS
  300.           The rrrr,,,, uuuu,,,, wwww,,,, XXXX,,,, llll,,,, FFFF,,,, CCCC, and _d_i_g_i_t options of Unix _t_a_r are
  301.           not supported.
  302.  
  303.           Multiple-tape (or floppy) archives should be supported, but
  304.           so far no clean way has been implemented.
  305.  
  306.           A bug in the Bourne Shell usually causes an extra newline to
  307.           be written to the standard error when using compressed or
  308.           remote archives.
  309.  
  310.           A bug in ``dd'' prevents turning off the ``x+y records
  311.           in/out'' messages on the standard error when ``dd'' is used
  312.           to reblock or transport an archive.
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                                           (printed 3/8/90)
  328.  
  329.  
  330.  
  331.